From e0417ef45521125bcc239cc12edbf2623e08dc6e Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 6 Apr 2008 20:25:45 +0000 Subject: [PATCH] (bug 12064) BeforePageDisplay hook is now called for all skins --- RELEASE-NOTES | 1 + includes/OutputPage.php | 4 ++++ includes/SkinTemplate.php | 4 ---- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 395ec3e97b..12b628e145 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -158,6 +158,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 13463) Login successful page doesn't use user's preferred interface language * (bug 13630) Fixed warnings for pass by reference at call time in Special:Revisiondelete when generating the log entry. +* (bug 12064) BeforePageDisplay hook is now called for all skins === API changes in 1.13 === diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 2f8bf10407..48302c03e0 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -779,6 +779,10 @@ class OutputPage { if ($this->mArticleBodyOnly) { $this->out($this->mBodytext); } else { + // Hook that allows last minute changes to the output page, e.g. + // adding of CSS or Javascript by extensions. + wfRunHooks( 'BeforePageDisplay', array( &$this ) ); + wfProfileIn( 'Output-skin' ); $sk->outputPage( $this ); wfProfileOut( 'Output-skin' ); diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 22fefb5157..afa96c3d91 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -139,10 +139,6 @@ class SkinTemplate extends Skin { $fname = 'SkinTemplate::outputPage'; wfProfileIn( $fname ); - // Hook that allows last minute changes to the output page, e.g. - // adding of CSS or Javascript by extensions. - wfRunHooks( 'BeforePageDisplay', array( &$out ) ); - $oldid = $wgRequest->getVal( 'oldid' ); $diff = $wgRequest->getVal( 'diff' ); -- 2.20.1